package com.app.action;

import java.io.BufferedReader;

import java.io.InputStreamReader;

import com.app.command.Command;
import com.app.command.CommandFactory;
import com.app.command.CommandResult;

public class App {

	public static void main(String[] args) throws Exception {

		InputStreamReader converter = new InputStreamReader(System.in);
		BufferedReader BRcm = new BufferedReader(converter);

		while (true) {
			PrintHelp help = new PrintHelp();
			help.Print();
			try {
  				String comline = BRcm.readLine();
				Command command = CommandFactory.getCommand(comline);
				CommandResult result = command.executeCommand();
				System.out.println(result.getStatus() + " : "
						+ result.getMessage());
			
			} catch (Exception e) {
				System.err.println("bad symbol, re-enter parametr");
			}

		}

	}

}


